#pragma once
#include "f2c.h"

using namespace System;

namespace SmartMathLibrary  {
	namespace PolynomialPack {
		public ref class ManagedPolynomialPackProvider
		{
		public:
			static 	double  log(double x);
			static		double  exp(double x);
			static double  sqrt(double x);
			static double  atan(double x);
			static double  pow_dd(double x, double y);
			static double  pow_dd(doublereal *ap,  doublereal *bp);
			static double  d_sign(doublereal *a,  doublereal *b);
			static double  r_sign(real *a, real *b);
			static double pow_ri(real *ap, integer *bp);
			static void  s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
			static double  pow_di(doublereal *ap, integer *bp);
			static int banfac_(doublereal *w, integer *nroww, integer *nrow, integer *nbandl, integer *nbandu, integer *iflag);
			static int banslv_(doublereal *w, integer *nroww, integer *nrow, integer *nbandl, integer *nbandu, doublereal *b);
			static int bchfac_(doublereal *w, integer *nbands, integer *nrow, doublereal *diag);
			static int bchslv_(doublereal *w, integer *nbands, integer *nrow, doublereal *b);
			static int bsplpp_(doublereal *t, doublereal *bcoef, integer *n, integer *k, doublereal *scrtch, doublereal *break__, doublereal *coef, integer *l);
			static int bsplvb_(doublereal *t, integer *jhigh, integer *index, doublereal *x, integer *left, doublereal *biatx);
			static int bsplvd_(doublereal *t, integer *k, doublereal *x, integer *left, doublereal *a, doublereal *dbiatx, integer *nderiv);
			static int bspp2d_(doublereal *t, doublereal *bcoef, integer *n, integer *k, integer *m, doublereal *scrtch, doublereal *break__, doublereal *coef);
			static doublereal bvalue_(doublereal *t, doublereal *bcoef, integer *n, integer *k, doublereal *x, integer *jderiv);
			static int chol1d_(doublereal *p, doublereal *v, doublereal *qty, integer *npoint, integer *ncol, doublereal *u, doublereal *qu);
			static int colloc_(doublereal *aleft, doublereal *aright, integer *lbegin, integer *iorder, integer *ntimes, doublereal *addbrk, doublereal *relerr);
			static int colpnt_(integer *k, doublereal *rho);
			static int cubspl_(doublereal *tau, doublereal *c__, integer *n, integer *ibcbeg, integer *ibcend);
			static int cwidth_(doublereal *w, doublereal *b, integer *nequ, integer *ncols, integer *integs, integer *nbloks, doublereal *d__, doublereal *x, integer *iflag);
			static int difequ_(integer *mode, doublereal *xx, doublereal *v);
			static int dtblok_(doublereal *bloks, integer *integs, integer *nbloks, integer *ipivot, integer *iflag, doublereal *detsgn, doublereal *detlog);
			static int eqblok_(doublereal *t, integer *n, integer *kpm, doublereal *work1, doublereal *work2, doublereal *bloks, integer *lenblk, integer *integs, integer *nbloks, doublereal *b);
			static int evnnot_(doublereal *break__, doublereal *coef, integer *l, integer *k, doublereal *brknew, integer *lnew, doublereal *coefg);
			static int factrb_(doublereal *w, integer *ipivot, doublereal *d__, integer *nrow, integer *ncol, integer *last, integer *iflag);
			static int fcblok_(doublereal *bloks, integer *integs, integer *nbloks, integer *ipivot, doublereal *scrtch, integer *iflag);
			static int interv_(doublereal *xt, integer *lxt, doublereal *x, integer *left, integer *mflag);
			static int knots_(doublereal *break__, integer *l, integer *kpm, doublereal *t, integer *n);
			static int l2appr_(doublereal *t, integer *n, integer *k, doublereal *q, doublereal *diag, doublereal *bcoef);
			static int l2err_(logical *prfun, doublereal *ftau, doublereal *error);
			static int l2knts_(doublereal *break__, integer *l, integer *k, doublereal *t, integer *n);
			static int newnot_(doublereal *break__, doublereal *coef, integer *l, integer *k, doublereal *brknew, integer *lnew, doublereal *coefg);
			static doublereal ppvalu_(doublereal *break__, doublereal *coef, integer *l, integer *k, doublereal *x, integer *jderiv);
			static int putit_(doublereal *t, integer *kpm, integer *left, doublereal *scrtch, doublereal *dbiatx, doublereal *q, integer *nrow, doublereal *b);
			static doublereal round_(doublereal *x);
			static int sbblok_(doublereal *bloks, integer *integs, integer *nbloks, integer *ipivot, doublereal *b, doublereal *x);
			static int setupq_(doublereal *x, doublereal *dx, doublereal *y, integer *npoint, doublereal *v, doublereal *qty);
			static int shiftb_(doublereal *ai, integer *ipivot, integer *nrowi, integer *ncoli, integer *last, doublereal *ai1, integer *nrowi1, integer *ncoli1);
			static int slvblk_(doublereal *bloks, integer *integs, integer *nbloks, doublereal *b, integer *ipivot, doublereal *x, integer *iflag);
			static doublereal smooth_(doublereal *x, doublereal *y, doublereal *dy, integer *npoint, doublereal *s, doublereal *v, doublereal *a);
			static int spli2d_(doublereal *tau, doublereal *gtau, doublereal *t, integer *n, integer *k, integer *m, doublereal *work, doublereal *q, doublereal *bcoef, integer *iflag);
			static int splint_(doublereal *tau, doublereal *gtau, doublereal *t, integer *n, integer *k, doublereal *q, doublereal *bcoef, integer *iflag);
			static int splopt_(doublereal *tau, integer *n, integer *k, doublereal *scrtch, doublereal *t, integer *iflag);
			static int subbak_(doublereal *w, integer *ipivot, integer *nrow, integer *ncol, integer *last, doublereal *x);
			static int subfor_(doublereal *w, integer *ipivot, integer *nrow, integer *last, doublereal *b, doublereal *x);
			static int tautsp_(doublereal *tau, doublereal *gtau, integer *ntau, doublereal *gamma, doublereal *s, doublereal *break__, doublereal *coef, integer *l, integer *k, integer *iflag);
			static int titand_(doublereal *tau, doublereal *gtau, integer *n);
		};
	}
}